package com.itany.corejava.code09_集合.Set;

import java.util.Arrays;
import java.util.Set;
import java.util.TreeSet;

/**
 * @author 石小俊
 * 2024年07月24日 15:39
 */
public class Test04_TreeSet {

    public static void main(String[] args) {
        Set<Integer> set = new TreeSet<>(Arrays.asList(14, 1, 18, 13, 5, 11, 7, 3, 8));
        System.out.println(set);

        Set<String> set2 = new TreeSet<>(Arrays.asList("tom", "jack", "alex", "lucy", "admin", "lily"));
        System.out.println(set2);

    }

}
